package com.fulihui.wgj.admin.integration;

import com.fulihui.common.result.rpc.BaseResult;
import com.fulihui.common.result.web.PageView;
import com.fulihui.common.result.web.Result;
import com.fulihui.wgj.admin.api.material.request.MaterialPageRequest;
import com.fulihui.wgj.admin.api.material.vo.MaterialImageVO;
import com.fulihui.wgj.admin.api.material.vo.MaterialNewsItemVO;
import com.fulihui.wgj.admin.api.material.vo.MaterialNewsVO;
import com.fulihui.wgj.facade.dto.WxMaterialDTO;
import com.fulihui.wgj.facade.request.material.WxMaterialRequest;

import java.util.List;

/**
 * @author: Levon
 * @date: 2018-07-11 15:31
 */
public interface MaterialServiceClient {

    /**
     * 分页查询图文列表
     *
     * @param request
     * @return
     */
    PageView<MaterialNewsVO> queryNewsPage(MaterialPageRequest request);

    /**
     * 分页查询图片列表
     *
     * @param request
     * @return
     */
    PageView<MaterialImageVO> queryImagePage(MaterialPageRequest request);

    /**
     * 解析图文详情
     *
     * @param content
     * @return
     */
    List<MaterialNewsItemVO> parse(String content);

    /**
     * 保存素材
     *
     * @param request
     * @return
     */
    BaseResult saveWxMaterial(WxMaterialRequest request);

    /**
     * 同步素材
     *
     * @param type
     * @return
     */
    Result<Boolean> syncMaterial(String appid, String type);

    /**
     * 查询图文素材
     *
     * @param mediaId 素材id
     * @return
     */
    WxMaterialDTO queryMaterialById(String mediaId);
}
